#include <stdio.h>
#include <math.h>

int main(void) {
    int n;
    scanf("%d", &n);
    for(int i = 0; i < n; i++) {
        char alice;
        char bob;
        char buf;
        while (buf = getchar(), buf == ' ' || buf == '\n') {}
        alice = buf;
        // 吞掉后面的字符
        while (buf = getchar(), buf != ' ' && buf != '\n') {}
        while (buf = getchar(), buf == ' ' || buf == '\n') {}
        bob = buf;
        while (buf = getchar(), buf != ' ' && buf != '\n') {}
        if (alice == bob) {
            puts("Draw");
            continue;
        }
        switch (alice) {
            case 'r':
                switch (bob) {
                    case 'p':
                        puts("Bob");
                        break;
                    case 's':
                        puts("Alice");
                        break;
                }
                break;
            case 'p':
                switch (bob) {
                    case 'r':
                        puts("Alice");
                        break;
                    case 's':
                        puts("Bob");
                        break;
                }
                break;
            case 's':
                switch (bob) {
                    case 'r':
                        puts("Bob");
                        break;
                    case 'p':
                        puts("Alice");
                        break;
                }
                break;
        }
    }
    return 0;
}
